/***************************************************************************
                          CVector3d.h  -  description
                             -------------------
    begin                : Wed Apr 13 2005
    copyright            : (C) 2005 by Martin Droba
    email                : droba_m@yahoo.com
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef CVECTOR3D_H
#define CVECTOR3D_H

#include <math.h>
/**
  *@author Martin Droba
  */

class CVector3d {
public: 
	CVector3d();
	CVector3d(double, double, double);
	~CVector3d();
  /** function for norm calculation  */
	double norma() const;
  /** operator + definition - addition of 2 vectors*/
	CVector3d operator+(CVector3d);
  /** operator - definition  */
	CVector3d operator-(CVector3d);
  /** operator * - multiplication vector*double */
	CVector3d operator*(double);
  /** scalar multiplication of 2 vectors*/
	double operator*(CVector3d);
    /**临时加入以便计算已知twiss参数的alpha、beta计算gamma的情况**/ 
	CVector3d operator/(CVector3d);
	CVector3d operator+(double);
  /** vector multiplication*/
	CVector3d operator||(CVector3d);
       /* void CVector3d::setCVector3d(double,double,double);
	double CVector3d::getX() const;
	double CVector3d::getY( ) const;
	double CVector3d::getZ( ) const;
	void   CVector3d::setX(double);
	void   CVector3d::setY(double);
	void   CVector3d::setZ(double);
         */
        void   setCVector3d(double,double,double);
	double getX() const;
	double getY( ) const;
	double getZ( ) const;
	void   setX(double);
	void   setY(double);
	void   setZ(double);
private: // Public attributes
  /** x-coordinate */
	double x;
  /** y-coordinate */
	double y;
  /** z-coordinate */
	double z;
};

#endif
